package net.comm.group.db;


import java.sql.ResultSet;
import java.sql.SQLException;


import net.comm.group.bean.BaseGFollForum;
import net.comm.group.bean.BaseGdianping;
import net.comm.group.bean.BaseGForum;
import net.comm.group.bean.BaseGdpTotal;
import net.comm.group.bean.BaseGroups;
import net.comm.oper.bean.Baseoperlog;
import net.comm.util.StringUtil;

import org.sakaiproject.db.api.SqlReader;

public class DbGdpTotalService implements SqlReader
{

	/**
	 * Read from the result one set of fields to create a Resource.
	 * 
	 * @param result
	 *        The Sql query result.
	 * @return The Resource object.
	 */
	public Object readSqlResultRecord(ResultSet result)
	{
		try
		{
			
			int  	userID = result.getInt(1);		//	用户ID
			int  	groupID = result.getInt(2);		//	用户ID
			String  dsort = StringUtil.getValue(result.getString(3));		//	所属板块
			int  	upNum = result.getInt(4);		//	表扬
			int  	downNum = result.getInt(5);		//	批评
			int  	total = result.getInt(6);		//	合计
			String  mtime = StringUtil.getValue(result.getString(7));		//	统计开始日期

			// create the Resource from these fields
			return new BaseGdpTotal( userID, groupID,  dsort,  upNum,  downNum, total,  mtime );
		}
		catch (SQLException e)
		{
			return null;
		}
		
	}
}
